package com.university.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Parttimestudent entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "parttimestudent", catalog = "university")

public class Parttimestudent implements java.io.Serializable {

	// Fields

	private Integer partTimeStudentId;
	private Student student;
	private Parttime parttime;
	private String partTimeStudentSchedule;

	// Constructors

	/** default constructor */
	public Parttimestudent() {
	}

	@Override
	public String toString() {
		return "Parttimestudent [partTimeStudentId=" + partTimeStudentId + ", student=" + student + ", parttime="
				+ parttime + ", partTimeStudentSchedule=" + partTimeStudentSchedule + "]";
	}

	/** full constructor */
	public Parttimestudent(Student student, Parttime parttime, String partTimeStudentSchedule) {
		this.student = student;
		this.parttime = parttime;
		this.partTimeStudentSchedule = partTimeStudentSchedule;
	}

	// Property accessors
	@Id
	@GeneratedValue

	@Column(name = "partTime_student_id", unique = true, nullable = false)

	public Integer getPartTimeStudentId() {
		return this.partTimeStudentId;
	}

	public void setPartTimeStudentId(Integer partTimeStudentId) {
		this.partTimeStudentId = partTimeStudentId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "student_id")

	public Student getStudent() {
		return this.student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "partTime_id")

	public Parttime getParttime() {
		return this.parttime;
	}

	public void setParttime(Parttime parttime) {
		this.parttime = parttime;
	}

	@Column(name = "partTime_student_schedule", length = 10)

	public String getPartTimeStudentSchedule() {
		return this.partTimeStudentSchedule;
	}

	public void setPartTimeStudentSchedule(String partTimeStudentSchedule) {
		this.partTimeStudentSchedule = partTimeStudentSchedule;
	}

}